package com.itheima.inner.practice01.practice02;

public class Test02 {
    public static void main(String[] args) {
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("游泳");
            }
        });
    }
    public static void goSwimming(Swimming swimming){
        swimming.swim();
    }
}
interface Swimming{
    void swim();
}